/*

Card test 3 : garden card

*/


#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "rngs.h"

// set NOISY_TEST to 0 to remove printfs from output
#define NOISY_TEST 1



int main() {

    printf("testing smithy card, before use: 5 cards, after use 7 cards (5 - 1(use) + 3(new) )");
    int i=1;
    int idx=100;
    while(idx>0){

    int seed = 1000;
    int numPlayer = 2;
    int r;
    int k[10] = {adventurer, council_room, feast, gardens, mine
               , remodel, smithy, village, baron, great_hall};
    struct gameState G;



    memset(&G, 23, sizeof(struct gameState));   // clear the game state
    r = initializeGame(numPlayer, k, seed, &G); // initialize a new game
    
    if(cardEffect(gardens, 0,0,0, &G, 0, 0)==-1)
        printf("\ntest remaing: %d, correct return\n",idx);
    else
	i++;

	idx--;
    }
    if(i==1)

	{
    printf("All tests passed!\n");
	}else{
	printf("test failed");	
	}
        

    return 0;
}
